Skip to content

fix(release): decide direct merge of release PRs from the REST merge state - #83

Merged
Andreas-Garcia merged 2 commits into
mainfrom
fix-arm-release-pr-merge-state
Nov 25, 2026
Merged

Andreas-Garcia merged 2 commits into
mainfrom
fix-arm-release-pr-merge-state

Conversation

@Andreas-Garcia

Copy link
Copy Markdown
Member

Summary

The release-PR arming script decides whether to merge a PR directly from its REST mergeable_state instead of matching the English text of GitHub's refusal. Refs #80.

Changes

  • Removed the clean status text match. When the auto-merge mutation fails, the script re-reads GET /pulls/{n}: clean → direct squash merge (pinned head, exact title) as before; unknown (computed asynchronously) → re-read up to 5 times, 2 s apart; any other state, or a head that moved, fails with the state in the message.
  • arm(..., sleep=time.sleep) is injectable for tests.
  • README (Auto-merging release PRs) and CHANGELOG (Fixed) updated.

Test plan

  • python3 -m unittest release/test_arm_release_pr_auto_merge.py: 18 tests pass, including new cases for clean state whatever the error text, unknown then clean, blocked, bounded unknown reads, and a moved head.
  • actionlint -config-file .github/actionlint.yaml: clean.
  • Full release discovery: 3 test_python_artifact failures that come from the local environment (No module named build), not from this change.

Screenshots

N/A

Risk

Intent change, depth standard: the script merges release PRs, but it stays fail-closed (only clean merges, the head stays pinned). A refusal that no longer says "clean status" now still merges when the PR is clean; unrelated refusals on non-clean PRs fail as before.

How to revert

Revert the squash commit.

Deployment notes

None. Target branch main; callers receive it with the next v6 release.

🤖 Generated with Claude Code

Andreas-Garcia and others added 2 commits November 25, 2026 16:14
…state

Refs #80

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Andreas-Garcia
Andreas-Garcia enabled auto-merge (squash) November 25, 2026 15:15
@Andreas-Garcia
Andreas-Garcia merged commit 90aa6ab into main Nov 25, 2026
10 checks passed
@Andreas-Garcia
Andreas-Garcia deleted the fix-arm-release-pr-merge-state branch November 25, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant